﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace GrayParrot.Data.Obsolete
{
    [Obsolete]
    public interface IRepository
    { }

    [Obsolete]
    public interface IRepository<T> : IRepository, ICRUD<T>, IReadOnly<T> where T : class
    {
        //IQueryable<T> GetAll();
        //IQueryable<T> FindBy(Expression<Func<T, bool>> predicate);
        //void Add(T entity);
        //void Delete(T entity);
        //void Edit(T entity);
        //void Save();
    }

    [Obsolete]
    public interface ICRUD<T> where T : class
    {
        void Add(T entity);
        void Delete(T entity);
        void Edit(T entity);
        void Save();
    }

    [Obsolete]
    public interface IReadOnly<T> where T : class
    {
        IQueryable<T> GetAll();
        IQueryable<T> FindBy(Expression<Func<T, bool>> predicate);
    }
}
